<#assign pageName="发送消息管理">
<@override name="head-styles">
</@override>
<@override name="page-content">
<form class="layui-form form-horizontal" role="form" method="post">
    <div class="layui-form-search panel">
        <input type="text" hidden="hidden" name="_STATE"/>
        <@ctrl.DateQuery path="queryDTO.queryStartDate" labelText="开始时间"/>
        <@ctrl.DateQuery path="queryDTO.queryEndDate" labelText="截止时间"/>
        <@ctrl.TextboxQuery path="bsMessageInfo.title" labelText="消息标题"/>
        <div class="margin-5">
            <a href="javascript:" onclick="$('form:first').submit();" class="layui-btn layui-btn-sm">
                <i class="layui-icon layui-icon-search"></i>查询
            </a>
            <a href="javascript:" class="layui-btn layui-btn-warm layui-btn-sm js-reset">
                <i class="layui-icon layui-icon-refresh-1"></i>重置
            </a>
            <a href="add" class="layui-btn layui-btn-normal layui-btn-sm">
                <i class="layui-icon layui-icon-addition"></i>新增
            </a>
        </div>
    </div>
        <table class="layui-table">
            <thead>
                <tr>
                    <th class="align-center" width="50" nowrap="nowrap">序号</th>
                    <th class="align-center" nowrap="nowrap">类型</th>
                    <th class="align-center" nowrap="nowrap">时间</th>
                    <th class="align-center" nowrap="nowrap">标题</th>
                    <th class="align-center">内容</th>
                </tr>
            </thead>
            <tbody>
            <#if (queryResult.rows)?has_content>
                <#list queryResult.rows as dataItem>  
                    <tr>
                        <td class="align-center" width="50" nowrap="nowrap">
                            ${(pageNo - 1) *pageSize + dataItem_index + 1}
                        </td>
                        <td class="align-center" nowrap="nowrap">
                            ${getStatusName(messageTypeMap, dataItem.type)}
                        </td>
                        <td class="align-center" nowrap="nowrap">
                            ${dataItem.createTime?datetime}
                        </td>
                        <td class="" nowrap="nowrap">
                            ${dataItem.title}
                        </td>
                        <td class="">
                           <div clas="layui-table-cell">
                               ${dataItem.content}
                           </div>
                        </td>
                    </tr>
                </#list>
            <#else>
                <tr>
                    <td class="align-center" colspan="8">
                        <span style="color:red;font-weight:bold;">暂无符合条件的消息信息！</span>
                    </td>
                </tr>
            </#if>
            </tbody>
        </table>
        <@ctrl.pageShow (queryResult.total)!0, (queryResult.pageIndex)!0 />
    </form>
</@override>
<@override name="page-scripts">
    <script>
    $(function(){
        layui.use(['form','layer','laydate','jquery'], function(){
            var form=layui.form;
            var layer=layui.layer;
            var laydate = layui.laydate;
            $=layui.jquery;
            laydate.render({
                elem: '#queryStartDate'
                ,trigger: 'click'
            });
            laydate.render({
                elem: '#queryEndDate'
                ,trigger: 'click'
            });
            $('.js-reset').on('click', function(){
                $('#pageNo').val(1);
                $('#title').val("");
                $('#queryStartDate').val("");
                $('#queryEndDate').val("");
                $('form:first').submit();
            });
        })
    })
    </script>
</@override>
<@extends name="/layout/basepage.html"/> 